import java.util.Scanner;
public class test538 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("Enter a decimal integer: ");
        int decimal = scanner.nextInt();
        scanner.close();
        if (decimal == 0) {
            System.out.println("Octal value: 0");
            return;
        }
        int[] octalDigits = new int[32];
        int index = 0;
        while (decimal > 0) {
            octalDigits[index++] = decimal % 8;
            decimal = decimal / 8;
        }
        System.out.print("Octal value: ");
        for (int i = index - 1; i >= 0; i--) {
            System.out.print(octalDigits[i]);
        }
    }
}
